home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 64 69 |.lang.c.|Path: di|
|00000020| 73 63 75 73 2e 74 65 63 | 68 6e 69 6f 6e 2e 61 63 |scus.tec|hnion.ac|
|00000030| 2e 69 6c 21 63 73 64 21 | 65 6d 69 6c 64 0a 46 72 |.il!csd!|emild.Fr|
|00000040| 6f 6d 3a 20 4b 6f 68 6e | 20 45 6d 69 6c 20 44 61 |om: Kohn| Emil Da|
|00000050| 6e 20 3c 65 6d 69 6c 64 | 40 63 73 2e 74 65 63 68 |n <emild|@cs.tech|
|00000060| 6e 69 6f 6e 2e 61 63 2e | 69 6c 3e 0a 53 75 62 6a |nion.ac.|il>.Subj|
|00000070| 65 63 74 3a 20 52 65 3a | 20 42 69 6e 61 72 79 20 |ect: Re:| Binary |
|00000080| 66 69 6c 65 73 20 3f 20 | 0a 43 6f 6e 74 65 6e 74 |files ? |.Content|
|00000090| 2d 54 79 70 65 3a 20 54 | 45 58 54 2f 50 4c 41 49 |-Type: T|EXT/PLAI|
|000000a0| 4e 3b 20 63 68 61 72 73 | 65 74 3d 55 53 2d 41 53 |N; chars|et=US-AS|
|000000b0| 43 49 49 0a 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |CII.Orga|nization|
|000000c0| 3a 20 54 65 63 68 6e 69 | 6f 6e 2c 20 49 73 72 61 |: Techni|on, Isra|
|000000d0| 65 6c 20 49 6e 73 74 69 | 74 75 74 65 20 6f 66 20 |el Insti|tute of |
|000000e0| 54 65 63 68 6e 6f 6c 6f | 67 79 0a 44 61 74 65 3a |Technolo|gy.Date:|
|000000f0| 20 53 61 74 2c 20 32 34 | 20 46 65 62 20 31 39 39 | Sat, 24| Feb 199|
|00000100| 36 20 30 34 3a 30 34 3a | 35 39 20 47 4d 54 0a 4d |6 04:04:|59 GMT.M|
|00000110| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 50 69 6e 65 |essage-I|D: <Pine|
|00000120| 2e 53 56 34 2e 33 2e 39 | 31 2d 68 65 62 2d 32 2e |.SV4.3.9|1-heb-2.|
|00000130| 30 34 2e 39 36 30 32 32 | 34 30 35 35 38 30 39 2e |04.96022|4055809.|
|00000140| 31 37 34 36 31 41 2d 31 | 30 30 30 30 30 40 63 73 |17461A-1|00000@cs|
|00000150| 2e 74 65 63 68 6e 69 6f | 6e 2e 61 63 2e 69 6c 3e |.technio|n.ac.il>|
|00000160| 0a 4d 69 6d 65 2d 56 65 | 72 73 69 6f 6e 3a 20 31 |.Mime-Ve|rsion: 1|
|00000170| 2e 30 0a 49 6e 2d 52 65 | 70 6c 79 2d 54 6f 3a 20 |.0.In-Re|ply-To: |
|00000180| 3c 34 67 68 65 65 65 24 | 62 76 72 40 63 69 2e 69 |<4gheee$|bvr@ci.i|
|00000190| 73 74 2e 75 74 6c 2e 70 | 74 3e 20 0a 58 2d 4e 6e |st.utl.p|t> .X-Nn|
|000001a0| 74 70 2d 50 6f 73 74 69 | 6e 67 2d 48 6f 73 74 3a |tp-Posti|ng-Host:|
|000001b0| 20 63 73 64 2e 63 73 2e | 74 65 63 68 6e 69 6f 6e | csd.cs.|technion|
|000001c0| 2e 61 63 2e 69 6c 0a 52 | 65 66 65 72 65 6e 63 65 |.ac.il.R|eference|
|000001d0| 73 3a 20 3c 34 67 68 65 | 65 65 24 62 76 72 40 63 |s: <4ghe|ee$bvr@c|
|000001e0| 69 2e 69 73 74 2e 75 74 | 6c 2e 70 74 3e 20 0a 53 |i.ist.ut|l.pt> .S|
|000001f0| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 64 69 73 63 |ender: n|ews@disc|
|00000200| 75 73 2e 74 65 63 68 6e | 69 6f 6e 2e 61 63 2e 69 |us.techn|ion.ac.i|
|00000210| 6c 20 28 4e 65 77 73 20 | 73 79 73 74 65 6d 29 0a |l (News |system).|
|00000220| 58 2d 53 65 6e 64 65 72 | 3a 20 65 6d 69 6c 64 40 |X-Sender|: emild@|
|00000230| 63 73 64 0a 0a 0a 0a 4f | 6e 20 32 32 20 46 65 62 |csd....O|n 22 Feb|
|00000240| 20 31 39 39 36 2c 20 64 | 65 6c 70 68 69 73 20 77 | 1996, d|elphis w|
|00000250| 72 6f 74 65 3a 0a 0a 3e | 20 0a 3e 20 0a 3e 20 0a |rote:..>| .> .> .|
|00000260| 3e 20 0a 3e 20 20 20 20 | 20 47 72 65 65 74 69 6e |> .> | Greetin|
|00000270| 67 73 20 66 72 6f 6d 20 | 61 20 66 72 75 73 74 72 |gs from |a frustr|
|00000280| 61 74 65 64 20 63 20 70 | 72 6f 67 72 61 6d 6d 65 |ated c p|rogramme|
|00000290| 72 21 0a 3e 20 20 20 20 | 20 49 20 70 72 6f 67 72 |r!.> | I progr|
|000002a0| 61 6d 20 69 6e 20 63 20 | 61 20 63 6f 75 70 6c 65 |am in c |a couple|
|000002b0| 20 6f 66 20 79 65 61 72 | 73 20 62 75 74 20 69 20 | of year|s but i |
|000002c0| 6e 65 76 65 72 20 66 69 | 67 75 72 65 20 6f 75 74 |never fi|gure out|
|000002d0| 20 74 68 69 73 20 62 61 | 73 69 63 20 0a 3e 20 71 | this ba|sic .> q|
|000002e0| 75 65 73 74 69 6f 6e 20 | 3a 20 68 6f 77 20 74 6f |uestion |: how to|
|000002f0| 20 77 6f 72 6b 20 77 69 | 74 68 20 62 69 6e 61 72 | work wi|th binar|
|00000300| 79 20 66 69 6c 65 73 20 | 3f 20 62 61 73 69 63 61 |y files |? basica|
|00000310| 6c 6c 79 2c 20 77 68 61 | 74 20 69 20 77 61 6e 74 |lly, wha|t i want|
|00000320| 20 74 6f 20 64 6f 20 0a | 3e 20 69 73 20 77 72 69 | to do .|> is wri|
|00000330| 74 69 6e 67 20 61 20 6d | 61 74 72 69 78 20 74 6f |ting a m|atrix to|
|00000340| 20 61 20 66 69 6c 65 20 | 61 6e 64 20 72 65 61 64 | a file |and read|
|00000350| 20 69 74 20 62 61 63 6b | 20 62 75 74 20 77 68 65 | it back| but whe|
|00000360| 6e 20 69 20 74 72 79 20 | 74 68 65 20 0a 3e 20 66 |n i try |the .> f|
|00000370| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 64 65 20 69 6e |ollowing| code in|
|00000380| 20 64 6f 73 20 74 68 65 | 20 6d 61 74 72 69 78 20 | dos the| matrix |
|00000390| 63 6f 6d 65 73 20 61 6c | 6c 20 67 6f 62 6c 65 64 |comes al|l gobled|
|000003a0| 2c 20 62 75 74 20 77 6f | 72 6b 73 20 66 69 6e 65 |, but wo|rks fine|
|000003b0| 20 69 6e 20 75 6e 69 78 | 21 0a 3e 20 20 20 20 20 | in unix|!.> |
|000003c0| 43 61 6e 20 61 6e 79 6f | 6e 65 20 74 65 6c 6c 20 |Can anyo|ne tell |
|000003d0| 6d 65 20 77 68 61 74 73 | 20 77 72 6f 6e 67 20 77 |me whats| wrong w|
|000003e0| 69 74 68 20 74 68 69 73 | 20 3f 20 49 20 68 61 76 |ith this| ? I hav|
|000003f0| 65 20 62 65 65 6e 20 75 | 73 69 6e 67 20 74 65 78 |e been u|sing tex|
|00000400| 74 20 66 69 6c 65 73 0a | 3e 20 61 6e 64 20 74 68 |t files.|> and th|
|00000410| 65 79 20 64 6f 6e 74 20 | 67 69 76 65 20 61 6e 79 |ey dont |give any|
|00000420| 20 74 72 6f 62 6c 65 20 | 61 74 20 61 6c 6c 21 0a | troble |at all!.|
|00000430| 3e 20 0a 3e 20 4f 62 72 | 69 67 61 64 69 73 73 69 |> .> Obr|igadissi|
|00000440| 6d 6f 21 0a 3e 20 0a 3e | 20 0a 3e 20 0a 3e 20 0a |mo!.> .>| .> .> .|
|00000450| 3e 20 23 20 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |> # incl|ude <std|
|00000460| 69 6f 2e 68 3e 0a 3e 20 | 0a 3e 20 0a 3e 20 76 6f |io.h>.> |.> .> vo|
|00000470| 69 64 20 6d 61 69 6e 28 | 29 0a 3e 20 7b 0a 3e 20 |id main(|).> {.> |
|00000480| 0a 3e 20 2f 2a 77 72 69 | 74 65 20 66 69 6c 65 2a |.> /*wri|te file*|
|00000490| 2f 0a 3e 20 69 6e 74 20 | 6e 3b 0a 3e 20 75 6e 73 |/.> int |n;.> uns|
|000004a0| 69 67 6e 65 64 20 63 68 | 61 72 20 6d 61 74 5b 32 |igned ch|ar mat[2|
|000004b0| 30 30 5d 3b 20 0a 3e 20 | 46 49 4c 45 20 2a 66 3d |00]; .> |FILE *f=|
|000004c0| 66 6f 70 65 6e 28 22 74 | 65 73 74 65 22 2c 22 77 |fopen("t|este","w|
|000004d0| 22 29 3b 20 2f 2a 64 6f | 20 69 20 68 61 76 65 20 |"); /*do| i have |
|000004e0| 74 6f 20 75 73 65 20 74 | 68 65 20 43 52 45 41 54 |to use t|he CREAT|
|000004f0| 45 20 62 65 66 6f 72 65 | 20 74 68 69 73 20 3f 2a |E before| this ?*|
|00000500| 2f 0a 3e 20 66 6f 72 20 | 28 6e 3d 30 3b 6e 3c 32 |/.> for |(n=0;n<2|
|00000510| 30 30 3b 6e 2b 2b 29 20 | 6d 61 74 5b 6e 5d 3d 6e |00;n++) |mat[n]=n|
|00000520| 3b 20 2f 2a 69 6e 69 74 | 20 6d 61 74 72 69 78 2a |; /*init| matrix*|
|00000530| 2f 0a 3e 20 66 77 72 69 | 74 65 28 6d 61 74 2c 32 |/.> fwri|te(mat,2|
|00000540| 30 30 2c 31 2c 66 29 3b | 0a 3e 20 66 63 6c 6f 73 |00,1,f);|.> fclos|
|00000550| 65 28 66 29 3b 0a 3e 20 | 0a 3e 20 2f 2a 72 65 73 |e(f);.> |.> /*res|
|00000560| 65 74 20 6d 61 74 72 69 | 78 2a 2f 0a 3e 20 66 6f |et matri|x*/.> fo|
|00000570| 72 20 28 6e 3d 30 3b 6e | 3c 32 30 30 3b 6e 2b 2b |r (n=0;n|<200;n++|
|00000580| 29 20 6d 61 74 5b 6e 5d | 3d 30 3b 0a 3e 20 0a 3e |) mat[n]|=0;.> .>|
|00000590| 20 2f 2a 72 65 61 64 20 | 66 69 6c 65 2a 2f 0a 3e | /*read |file*/.>|
|000005a0| 20 66 3d 66 6f 70 65 6e | 28 22 74 65 73 74 65 22 | f=fopen|("teste"|
|000005b0| 2c 22 72 22 29 3b 0a 3e | 20 66 72 65 61 64 28 6d |,"r");.>| fread(m|
|000005c0| 61 74 2c 32 30 30 2c 31 | 2c 66 29 3b 0a 3e 20 66 |at,200,1|,f);.> f|
|000005d0| 63 6c 6f 73 65 28 66 29 | 3b 0a 3e 20 66 6f 72 20 |close(f)|;.> for |
|000005e0| 28 6e 3d 30 3b 6e 3c 32 | 30 30 3b 6e 2b 2b 29 20 |(n=0;n<2|00;n++) |
|000005f0| 70 72 69 6e 74 66 28 22 | 25 64 20 22 2c 6d 61 74 |printf("|%d ",mat|
|00000600| 5b 6e 5d 29 3b 2f 2a 70 | 72 69 6e 74 20 69 74 2a |[n]);/*p|rint it*|
|00000610| 2f 0a 3e 20 7d 0a 3e 20 | 0a 3e 20 0a 0a 4a 75 73 |/.> }.> |.> ..Jus|
|00000620| 74 20 6f 70 65 6e 20 74 | 68 65 20 66 69 6c 65 20 |t open t|he file |
|00000630| 75 73 69 6e 67 20 20 22 | 72 62 22 20 66 6f 72 20 |using "|rb" for |
|00000640| 72 65 61 64 69 6e 67 20 | 61 6e 64 20 22 77 62 22 |reading |and "wb"|
|00000650| 20 66 6f 72 20 77 72 69 | 74 69 6e 67 2c 20 28 69 | for wri|ting, (i|
|00000660| 6e 73 74 65 61 64 20 0a | 6f 66 20 22 72 22 2c 20 |nstead .|of "r", |
|00000670| 61 6e 64 20 22 77 22 20 | 72 65 73 70 65 63 74 69 |and "w" |respecti|
|00000680| 76 65 6c 79 2c 20 61 6e | 64 20 65 76 65 72 79 74 |vely, an|d everyt|
|00000690| 68 69 6e 67 20 77 69 6c | 6c 20 62 65 20 6f 6b 2e |hing wil|l be ok.|
|000006a0| 20 0a 0a 49 6e 20 55 4e | 49 58 2c 20 74 68 65 72 | ..In UN|IX, ther|
|000006b0| 65 20 69 73 20 6e 6f 20 | 64 69 66 66 65 72 65 6e |e is no |differen|
|000006c0| 63 65 20 62 65 74 77 65 | 65 6e 20 74 65 78 74 20 |ce betwe|en text |
|000006d0| 61 6e 64 20 62 69 6e 61 | 72 79 20 66 69 6c 65 73 |and bina|ry files|
|000006e0| 2c 20 61 20 66 69 6c 65 | 20 69 73 20 0a 61 20 73 |, a file| is .a s|
|000006f0| 74 72 65 61 6d 20 6f 66 | 20 62 79 74 65 73 2e 20 |tream of| bytes. |
|00000700| 49 6e 20 44 4f 53 2c 20 | 74 68 65 20 73 69 74 75 |In DOS, |the situ|
|00000710| 61 74 69 6f 6e 20 69 73 | 20 6d 75 63 68 20 73 74 |ation is| much st|
|00000720| 72 61 6e 67 65 72 2c 20 | 49 20 74 68 69 6e 6b 20 |ranger, |I think |
|00000730| 68 65 20 0a 65 78 70 61 | 6e 64 73 20 5c 6e 20 74 |he .expa|nds \n t|
|00000740| 6f 20 5c 6e 5c 72 2c 20 | 61 6e 64 20 70 75 74 73 |o \n\r, |and puts|
|00000750| 20 61 6e 20 45 4f 46 20 | 28 43 54 52 4c 2d 5a 29 | an EOF |(CTRL-Z)|
|00000760| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 66 | at the |end of f|
|00000770| 69 6c 65 2c 20 77 68 65 | 6e 20 61 20 0a 66 69 6c |ile, whe|n a .fil|
|00000780| 65 20 69 73 20 6f 70 65 | 6e 65 64 20 69 6e 20 74 |e is ope|ned in t|
|00000790| 65 78 74 20 6d 6f 64 65 | 2e 0a 0a 41 6e 64 20 6c |ext mode|...And l|
|000007a0| 61 73 74 2c 20 62 75 74 | 20 6e 6f 74 20 6c 65 61 |ast, but| not lea|
|000007b0| 73 74 3a 20 6d 61 69 6e | 28 29 20 72 65 74 75 72 |st: main|() retur|
|000007c0| 6e 73 20 69 6e 74 2c 20 | 6e 6f 74 20 76 6f 69 64 |ns int, |not void|
|000007d0| 2e 2e 2e 0a 0a 0a 48 6f | 70 65 20 74 68 69 73 20 |......Ho|pe this |
|000007e0| 68 65 6c 70 73 2e 0a 0a | 09 09 09 09 09 09 52 65 |helps...|......Re|
|000007f0| 67 61 72 64 73 2c 20 0a | 0a 09 09 09 09 09 09 09 |gards, .|........|
|00000800| 45 6d 69 6c 0a | |Emil. | |
+--------+-------------------------+-------------------------+--------+--------+